<template>
    <div class="bodys">
      <div class="textarea">
        <p style="line-height: 10vw;"><span>*</span>本平台仅提供纸质发票</p>
        <p><span>*</span>发票内容显示商品名称、价格税务等信息</p>
      </div>
      <div class="contents">
        <div class="btn">
          <button @click="person" class="persons">个人</button>
          <button @click="company" class="companys">企业</button>
        </div>
        <div class="person" id="person">
          <input type="text" placeholder="名字" class="input">
        </div>
        <div class="company" style="display: none;" id="company">
          <input type="text" placeholder="公司名称">
          <input type="text" placeholder="纳税识别号或统一社会信用代码" style="margin-top: 3vw;">
        </div>
        <button class="finished">完成</button>
        <router-link to="/order">本次不开发票，继续下单</router-link>
      </div>
    </div>
</template>

<script>
    export default {
        name: "invoice",
      data(){
          return{
            choose:false,
          }
      },
      methods:{
          person(choose){
            $("#company").hide(); $("#person").show();
            $('.persons').css({"background":"#ff4c50","color":"#fff","border":"none"});$('.companys').css({"background":"#fff","color":"#666","border":"1px solid #666"});
          },
          company(){
            $("#company").show();$("#person").hide();
            $('.companys').css({"background":"#ff4c50","color":"#fff","border":"none"});$('.persons').css({"background":"#fff","color":"#666","border":"1px solid #666"});
          }
      }
    }
</script>

<style scoped lang="scss">
.bodys{
  width: 100vw;
  height: 100vh;
  background: #f5f5f5;
    .textarea{
      font-size: 12px;
        p{
          color: #333;
          height: 8vw;
          text-indent: 4vw;
          span{
            color: #ff4c50;
          }
        }
    }
  .contents{
    background: #fff;
    width: 100vw;
    height: 78.33vw;
    padding-top: 5.33vw;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    position: relative;
    a{
      text-decoration: underline;
      color: #ff4c50;
      font-size: 11px;
      position: absolute;
      right: 4vw;
      bottom: 5vw;
    }
    .finished{
      width: 92vw;
      height: 12vw;
      font-size: 24px;
      color: #fff;
      -webkit-border-radius: 1vw;
      -moz-border-radius: 1vw;
      border-radius: 1vw;
      margin-left: 4vw;
      background: #000;
      position: absolute;
      bottom: 11vw;
    }
    .person{
      width: 92vw;
      margin: 0px auto;
      margin-top: 5.33vw;
    }
    .company{
      width: 92vw;
      margin: 0px auto;
      margin-top: 5.33vw;
    }
      .btn{
        width:61.33vw;
        height:8.2vw;
        margin: 0px auto;
          .persons{
            width: 24vw;
            height:8.2vw;
            float:left;
            background: #ff4c50;
            color: #fff;
            -webkit-border-radius: 1vw;
            -moz-border-radius: 1vw;
            border-radius: 1vw;
          }
          .companys{
            width: 24vw;
            height:8.2vw;
            color: #666;
            background: #fff;
            border: 1px solid #666;
            float: right;
            border-radius: 1vw;
          }
      }
  }
}
input{
  width: 92vw;
  background: #f5f5f5;
  text-indent: 2vw;
  height: 13.33vw;
  display: inline-block;
}
input::placeholder{
  color: #333;
  font-size: 16px;
}
</style>
